package org.com.atmarkcafe.sky.dialog;

import org.com.app.knock.view.LoadingView;

import z.lib.base.BaseAdapter;
import z.lib.base.CommonAndroid;
import z.lib.base.BaseAnimationUtils.AnimationAction;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.view.WindowManager;
import android.widget.GridView;

import com.acv.libs.nbase.MbaseAdialog;
import com.app.lazyload.ImageLoader2;
import com.knock.app.R;

public class AreaDialog extends MbaseAdialog implements android.view.View.OnClickListener {
	GridView listView;
	private BaseAdapter baseAdapter;
	private LoadingView loading;
	public static ImageLoader2 imageLoader;
	public AreaDialog(Context context, OnClickListener clickListener) {
		super(context, clickListener);
		getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
	}

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		initHeader();
//		findViewById(R.id.profile_user_btnchangepass).setOnClickListener(this);
		openPopActivity(findViewById(R.id.dialog_m_main));
		imageLoader = new ImageLoader2(getActivity());
		loading = (LoadingView) findViewById(R.id.loading);//CommonAndroid.getView(view, R.id.loading);
	}

	private void initHeader() {
		
	}

	private void close(final boolean isOnClick) {
		closePopActivity(getContext(), findViewById(R.id.dialog_m_main), new AnimationAction() {

			@Override
			public void onAnimationEnd() {
				dismiss();
				if (isOnClick) {
					clickListener.onClick(null, 0);
				}
			}
		});
	}

	@Override
	public int getLayout() {
		return R.layout.area;
	}

	@Override
	public void onClick(View v) {
		
	}

	private Context getActivity() {
		return getContext();
	}
}